import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 查询车型
export const queryModel = params => axios.get(`${SERVER.CMSCLOUD_EPC}/grade/gradeInfo/queryModel`, {params});
//查询系统
export const querySystem = params => axios.get(`${SERVER.CMSCLOUD_EPC}/grade/gradeInfo/querySystem`,{params});
//查询总成或备件
export const queryGraphicInFo = params => axios.get(`${SERVER.CMSCLOUD_EPC}/grade/gradeInfo/queryGraphicInFo`,{params});
//查询表格中的数据
export const queryParts = params => axios.get(`${SERVER.CMSCLOUD_EPC}/grade/gradeInfo/queryParts`,{params});
//保存热点
export const insertAndUpdate = params => axios.put(`${SERVER.CMSCLOUD_EPC}/grade/gradeInfo/insertAndUpdate/${params.assemblyId}`, params.list)
//查询热点
export const queryGradeInFo = params => axios.get(`${SERVER.CMSCLOUD_EPC}/grade/gradeInfo/queryGradeInFo`,{params});

//查询配件的信息及编辑页面中table数据
export const queryPartsInFo = params => axios.get(`${SERVER.CMSCLOUD_EPC}/grade/gradeInfo/queryPartsInFo/${params.graphicCode}/${params.graphicId}`);
//查询图片
export const getFileGroup = params => axios.get(`${SERVER.CMSCLOUD_EPC}/grade/gradeInfo/getfilelist`, { params });

// 查询备件替换件信息
export const getSubPartList = params => axios.get(`${SERVER.CMSCLOUD_EPC}/grade/gradeInfo/getSubPartList`, {params});
